<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> TEST </TITLE>
</HEAD>

<BODY onload="init()">
<script src="AIRAliases.js" type="text/javascript"></script>
<SCRIPT LANGUAGE="JavaScript" src="http://maps.naver.com/js/naverMap.naver?key=1a41975fee031828557550a6ba9e1c45"></SCRIPT>
<div id='mapContainer' style='width:385px;height:265px'></div>
<SCRIPT LANGUAGE="JavaScript">
<!--
	var mapObj = new NMap(document.getElementById('mapContainer'));
	
	// 축척 슬라이드바를 생성합니다.
	var zoom =new NZoomControl();
	// 축척 슬라이드바를 지도상의 왼쪽, 아래로 이동 시킵니다
	zoom.setAlign("left");
	zoom.setValign("bottom");
	// 지도 객체에 축척 슬라이드바 컨트롤을 등록합니다.
	mapObj.addControl(zoom);
	
	//var infowin = new NInfoWindow();
	//mapObj.addOverlay(infowin);
	
	var mark = new NMark(new NPoint(0,0), new NIcon("icon_32.png", new NSize(32,32), new NSize(16,32)));
	mapObj.addOverlay(mark);
	
	NEvent.addListener(mapObj,"dblclick",dblclicked);
	
	var longitude = 309822;
	var latitude = 553040;
	
	function dblclicked(pos)
	{
		mark.setPoint(pos);
		
		AIR_on_Map_dblclicked(pos);		
	}
	
	function setMapPos(x, y)
	{
	    pos = new NPoint(x,y);
		mapObj.setCenterAndZoom(pos,3);
		mark.setPoint(pos);
	}
	
	function getURLParam(strParamName)
	{
	  var strReturn = "";
	  var strHref = window.location.href;
	  if ( strHref.indexOf("?") > -1 )
	  {
	    var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
	    var aQueryString = strQueryString.split("&");
	    for ( var iParam = 0; iParam < aQueryString.length; iParam++ )
	    {
	      if (aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 )
		  {
	        var aParam = aQueryString[iParam].split("=");
	        strReturn = aParam[1];
	        break;
	      }
	    }
	  }

	  return unescape(strReturn);
	} 

	
	function init() 
	{
		var param = getURLParam("longitude");
        if ( param != "" )
        {
          longitude = parseFloat(param);
        }
        param = getURLParam("latitude");
        if ( param != "" )
        {
          latitude = parseFloat(param);
        }
        
        mapObj.setCenterAndZoom(new NPoint(longitude,latitude),8);
        
    }
	
//-->
</SCRIPT>
</BODY>
</HTML>
